<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="../css/cache.css"/>
	    <link rel="stylesheet" type="text/css" href="../css/zy.media.min.css"/>
		<script type="text/javascript" src="../js/jquery-2.0.3.js"></script>
		<script type="text/javascript" src="../layer/layer.js"></script>
		<script type="text/javascript" src="../js/rem.js"></script>
		<script type="text/javascript">
			$(window).load(function() {
				$('#box').delay(200).show()
			})
		</script>
	</head>
	<body>
		<div id="box">
			<!--头部区-->
			<header class="fornews-head">
				<i onclick="goBack()" class="iconfont">&#xe621;</i>
				<h2>缓存</h2>
				<p class="cache-delect">编辑</p>
			</header>
			<!--内容区-->
			<section class="fornews">
				<div class="cache-cont">
					
				</div>
			</section>
		</div>
	</body>
	<script type="text/javascript" src="../js/reset.js"></script>
	<script type="text/javascript" src="../js/zy.media.min.js"></script>
	<script type="text/javascript">
		var c=localStorage.getItem("huancun")
	   var b=localStorage.getItem("video_id")
		$.ajax({
            type: 'POST',
            url: 'http://192.168.199.114:8080/HJF/user/get_video_info.do',
            dataType: 'JSON',
            data:{video_id:c},
            success: function(data){
            	console.log(data)
            	/*视频*/
            	var oDiv=$('<div class="zy_media">'+
					    '<video class="video" controls="controllers" width="100%" height: 100%; poster="'+data.data.video_img_url+'">'+
					       ' <source src="'+data.data.video_url +'" type="video/mp4">您的浏览器不支持HTML5视频'+
					    '</video></div><i class="iconfont mycollection-delect">&#xe62e;</i>')
             $('.cache-cont').append(oDiv)
             var num=0; 
			$('.cache-delect').click(function(e){ 
			if(num++ %2 == 0){ 
			$('.mycollection-delect').show()
			 $('.mycollection-delect').on('click',function(){
			   $(this).siblings().remove()  
			   localStorage.removeItem('huancun')
		     })
			}else{ 
			$('.mycollection-delect').css('display','none')
			} 
			e.preventDefault(); //阻止元素的默认动作（如果存在） 
			}); 
              zymedia('video');
            },
            error: function(xhr, type){
                alert('Ajax error!');
            }
        });
	</script>
</html>
